import React from 'react'
import { withRouter} from 'react-router-dom'

function Login(props) {
    const login = () => {
        sessionStorage.setItem('token', 'qwetr')
        props.history.push(props.location.backUrl)
    }
    return (
        <div>
            <button onClick = { login }>点我</button>
        </div>
    )
}

export default withRouter(Login)
